<template>
  <div>
    <van-field  label='标题' v-model='form.title'/>
    <van-button @click='submit'>发布</van-button>


  </div>
</template>

<script>
import myaxios from "@/http/axios";

export default {
  name: "news",
  data() {
    return {
      data1: '',
      form:{"userid":localStorage.getItem("uid")}
    }
  },
  methods: {
    submit(){
      myaxios('newsM','post',this.form).then(res=>{
        console.log(res)
        alert('发布成功')
      })
    }
  },
  mounted() {

  }
}
</script>

<style scoped>

</style>